package com.fire.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fire.bo.coupon.req.DelCouponReq;
import com.fire.bo.online.req.OnlineReq;
import com.fire.bo.online.res.OnlineRes;
import com.fire.dao.OnlineDao;
import com.fire.service.OnlineService;
@Service
public class OnlineServiceImpl implements OnlineService {

	@Autowired
	private OnlineDao onlineDao; 
	
	@Override
	public void updateOnline(DelCouponReq bean) throws SQLException {
		onlineDao.updateOnline(bean);
	}

	@Override
	public void delOnline(DelCouponReq bean) throws SQLException {
		
		onlineDao.delOnline(bean);
	}

	@Override
	public List<OnlineRes> onlineList(OnlineReq bean) throws SQLException {
		
		bean.setPage((bean.getPage() - 1) * bean.getPageSize());
		
		return onlineDao.onlineList(bean);
	}

	@Override
	public int onlineListCount(OnlineReq bean) throws SQLException {
		
		return onlineDao.onlineListCount(bean);
	}

}
